Dynamic Window GAM Analysis: Comprehensive Synthesis

Author

Kyle Nessen

Published

October 3, 2025

0.1 Background

This document synthesizes results from two parallel GAM analyses investigating the relationship between weather conditions and monarch butterfly roost abandonment. Both analyses address feedback from Francis regarding temporal alignment of weather predictors with butterfly responses.

The original daily-level analysis used fixed 6am-6pm weather windows, which Francis identified as having a temporal logic issue:

“All of the metrics for wind, temperature and light, would need to be re-calculated for 24 hour periods that begin at the time of the highest count.”

Francis’s key points:

  1. Temporal alignment: Butterflies can only respond to weather after it occurs
  2. Biological timing: If max count occurred at 2pm on day t-1, the relevant weather window should start at 2pm, not 6am
  3. Roosting decisions: Weather from max count through sunset determines whether butterflies abandon the roost

0.2 Two-Window Comparison Approach

To address this feedback while exploring biological relevance, we conducted two parallel analyses:

Sunset Window Analysis (variable-length windows):

  • Weather window: time_of_max_count_t_1last_observation_time_t (functional sunset)
  • Mean duration: 29.6 hours (range: 22.5-34.9 hours)
  • Captures overnight conditions through sunset when roosting decisions finalize
  • Tests: “Do conditions from peak count to sunset predict roost abandonment?”
  • Data: monarch_daily_lag_analysis_sunset_window.csv (n=103 lag pairs)

24-Hour Window Analysis (fixed-length windows):

  • Weather window: time_of_max_count_t_1+24 hours
  • Fixed duration: exactly 24 hours for all observations
  • Standardized exposure period following peak count
  • Tests: “Do conditions in 24 hours following peak count predict roost abandonment?”
  • Data: monarch_daily_lag_analysis_24hr_window.csv (n=94 lag pairs)

Both analyses use identical modeling approaches to enable direct comparison of results across window definitions.


1 Response Variable Selection

We evaluated three butterfly difference metrics (max, 95th percentile, and top 3 mean) with three transformations each (untransformed, square root, and square) to determine which best approximates normality for GAM modeling.

1.1 Normality Testing Results

Shapiro-Wilk Normality Tests for Response Variable Transformations (sorted by W statistic)
variable shapiro_stat p_value skewness kurtosis n
butterfly_diff_sqrt 0.9893 0.6368 0.2251 -0.3143 96
butterfly_diff_95th_sqrt 0.9880 0.5411 0.0120 -0.6497 96
butterfly_diff_top3_sqrt 0.9875 0.5027 0.0266 -0.6207 96
butterfly_diff_95th 0.9182 0.0000 -0.3705 2.0466 96
butterfly_diff_top3 0.9126 0.0000 -0.0126 2.4706 96
butterfly_diff 0.8835 0.0000 0.3794 4.3938 96
butterfly_diff_95th_sq 0.6591 0.0000 -1.2037 9.1440 96
butterfly_diff_top3_sq 0.6327 0.0000 0.6220 10.0799 96
butterfly_diff_sq 0.5307 0.0000 1.9996 19.7056 96

1.2 Selected Response Variable

butterfly_diff_sqrt was selected as the response variable for both analyses based on having the highest Shapiro-Wilk W statistic, indicating best approximation to normality.

This represents the square root transformation of the change in maximum butterfly count from day t-1 to day t. The transformation:

  • Reduces right skew in the distribution
  • Stabilizes variance
  • Improves model residual diagnostics
  • Maintains interpretability (signed square root preserves direction)

Response Variable Distributions

2 Candidate Predictor Variables

A total of 20 candidate weather predictors were calculated within each observation’s dynamic window. These fall into four categories:

Candidate Predictor Variables (user to fill in descriptions)
Variable Category Description
temp_min Temperature
temp_max Temperature
temp_mean Temperature
temp_range Temperature
temp_at_max_count_t_1 Temperature
wind_min Wind
wind_max Wind
wind_mean Wind
wind_max_gust Wind
wind_gust_mode Wind
sum_butterflies_direct_sun Sun Exposure
sum_butterflies_in_sun Sun Exposure
sum_butterflies_partial_sun Sun Exposure
proportion_butterflies_direct_sun Sun Exposure
proportion_butterflies_in_sun Sun Exposure
proportion_butterflies_partial_sun Sun Exposure
lag_duration_hours Window Characteristics
window_start_hour Window Characteristics
window_end_hour Window Characteristics
metrics_complete Window Characteristics

Note: Fill in the Description column with rationale for each variable category.

2.1 Wind Gust Mode: An Excluded Variable

wind_gust_mode was initially considered as a candidate predictor due to its low correlation with other wind metrics (r < 0.3 with wind_max_gust). This suggested it might capture unique aspects of wind variability not represented by mean, max, or max gust.

However, wind_gust_mode had to be excluded from model fitting due to having only 5 unique values across all observations. This extreme discretization caused:

  • Model convergence failures
  • Inability to estimate smooth terms
  • Numerical instability in GAM fitting

While conceptually interesting, the variable’s limited granularity made it unsuitable for inclusion in the statistical models.


3 Correlation Analysis

3.1 Full Correlation Matrix (All Candidates)

The full 20×20 correlation matrix reveals substantial multicollinearity among candidate predictors, particularly within variable categories:

Full Correlation Matrix: All 20 Candidate Predictors

Key observations:

  • Temperature metrics: Strong intercorrelation (r > 0.8) among temp_min, temp_max, temp_mean
  • Wind metrics: Moderate to strong correlation (r = 0.5-0.9) among wind measures
  • Sun exposure: Very high correlation (r > 0.95) between proportion and sum metrics
  • Window characteristics: Lag duration correlates with completeness metrics

These patterns guided predictor selection to avoid multicollinearity issues.

3.2 Selected Predictors Correlation Matrix

Based on correlation structure, biological relevance, and variance inflation considerations, we selected 5 final predictors representing distinct aspects of weather exposure:

Correlation Matrix: Selected 5 Predictors

Final predictor set:

  1. temp_min - Minimum temperature (captures cold stress)
  2. temp_max - Maximum temperature (captures heat stress)
  3. temp_at_max_count_t_1 - Temperature at time of peak count (initial conditions)
  4. wind_max_gust - Maximum wind gust (captures wind extremes)
  5. sum_butterflies_direct_sun - Total minutes butterflies exposed to direct sun (sun exposure)

These predictors show moderate correlation (r < 0.7) and represent distinct weather dimensions, minimizing multicollinearity while capturing biological hypotheses.


4 Model Building Strategy

Both analyses employed an identical systematic model-building approach to ensure comparability.

4.1 Model Space Exploration

We fit 76 models spanning a hierarchy of complexity:

  1. Null models (2): Intercept only, with smooth vs. linear baseline
  2. Single predictor models (10): Each of 5 predictors, smooth vs. linear
  3. Interaction-only models (20): All 2-way interactions, smooth vs. linear
  4. Additive models (14): Multiple predictors without interactions, smooth vs. linear
  5. Main + Interaction models (20): Additive + selected interactions, smooth vs. linear
  6. Complex models (8): All temperatures, all temps + wind, etc.
  7. Full models (2): All predictors + all interactions, smooth vs. linear

This systematic exploration tests:

  • Individual predictor effects: Which variables matter in isolation?
  • Interaction effects: Do predictors combine synergistically?
  • Functional form: Linear vs. smooth (spline) relationships?
  • Model complexity: What level of complexity is justified by data?

4.2 GAM Structure

All models used the same core structure:

butterfly_diff_sqrt ~ predictors + s(deployment_id, bs="re")
  + correlation = corAR1(form = ~1|deployment_id)

Key components:

  • Response: butterfly_diff_sqrt (square root transformed change in maximum count)
  • Random effects: s(deployment_id, bs="re") accounts for repeated measures within deployments
  • Autocorrelation: corAR1() models temporal autocorrelation within deployments
  • Functional form: Smooth terms s() for nonlinear relationships vs. linear terms
  • Family: Gaussian with identity link (justified by normality of transformed response)

4.3 Overfitting Controls

To prevent overfitting with small sample sizes (n=94-103), we implemented:

  1. AICc (corrected AIC): Primary model selection criterion, penalizes parameters more heavily than AIC
  2. Degrees of freedom ratio: Tracked df/n ratio (flagged if >0.25)
  3. Observations per parameter: Monitored n/df (flagged if <5)
  4. Cross-validation: LOOCV to assess out-of-sample prediction error
  5. Overfitting risk classification: Models flagged as Low/Moderate/High risk based on df ratios

Models with df/n > 0.4 or obs/param < 3 were flagged as High overfitting risk.

4.4 Model Comparison Approach

Models were compared using:

  1. AICc ranking: Lower AICc indicates better balance of fit and complexity
  2. ΔAICc: Difference from best model (ΔAICc > 10 indicates substantially worse fit)
  3. AICc weights: Relative likelihood of each model being the best
  4. Cross-validation RMSE: Out-of-sample prediction error
  5. BIC: Alternative information criterion (more conservative penalty)

Selection criteria:

  • Best model: Lowest AICc
  • Competitive models: ΔAICc < 2
  • Considerably worse: ΔAICc > 10

5 Sunset Window Analysis Results

5.1 Model Comparison

The table below shows the top 30 models ranked by AICc for the sunset window analysis:

Top 30 Models: Sunset Window Analysis (ranked by AICc)
model description AICc delta_AICc weight_AICc df obs_per_param overfitting_risk
M31 Interaction: wind_max_gust × sum_butterflies_direct_sun (smooth) 640.22 0.00 0.7993 11 8.73 Low
M51 Additive + Interaction: wind_max_gust + sum_butterflies_direct_sun + wind_max_gust×sum_butterflies_direct_sun (smooth) 644.13 3.90 0.1135 15 6.40 Low
M45 Additive + Interaction: temp_max + sum_butterflies_direct_sun + temp_max×sum_butterflies_direct_sun (smooth) 648.52 8.29 0.0126 15 6.40 Low
M32 Interaction: wind_max_gust × sum_butterflies_direct_sun (linear) 648.85 8.63 0.0107 9 10.67 Low
M19 Interaction: temp_min × sum_butterflies_direct_sun (smooth) 649.34 9.12 0.0084 11 8.73 Low
M5 Single: temp_max (smooth) 649.46 9.23 0.0079 10 9.60 Low
M29 Interaction: temp_at_max_count_t_1 × sum_butterflies_direct_sun (smooth) 649.74 9.52 0.0069 11 8.73 Low
M43 Additive + Interaction: temp_max + wind_max_gust + temp_max×wind_max_gust (smooth) 650.12 9.89 0.0057 15 6.40 Low
M23 Interaction: temp_max × wind_max_gust (smooth) 650.17 9.95 0.0055 11 8.73 Low
M33 Additive + Interaction: temp_min + temp_max + temp_min×temp_max (smooth) 650.52 10.30 0.0046 15 6.40 Low
M39 Additive + Interaction: temp_min + sum_butterflies_direct_sun + temp_min×sum_butterflies_direct_sun (smooth) 651.39 11.17 0.0030 15 6.40 Low
M25 Interaction: temp_max × sum_butterflies_direct_sun (smooth) 651.78 11.56 0.0025 11 8.73 Low
M59 Additive: temp_max + wind_max_gust (smooth) 652.14 11.92 0.0021 12 8.00 Low
M55 Additive: temp_min + temp_max (smooth) 652.25 12.03 0.0020 12 8.00 Low
M15 Interaction: temp_min × temp_at_max_count_t_1 (smooth) 652.64 12.42 0.0016 11 8.73 Low
M17 Interaction: temp_min × wind_max_gust (smooth) 652.73 12.51 0.0015 11 8.73 Low
M11 Single: sum_butterflies_direct_sun (smooth) 652.82 12.60 0.0015 10 9.60 Low
M13 Interaction: temp_min × temp_max (smooth) 652.93 12.71 0.0014 11 8.73 Low
M1 Null (smooth baseline) 653.17 12.95 0.0012 8 12.00 Low
M21 Interaction: temp_max × temp_at_max_count_t_1 (smooth) 653.48 13.26 0.0011 11 8.73 Low
M27 Interaction: temp_at_max_count_t_1 × wind_max_gust (smooth) 653.70 13.47 0.0009 11 8.73 Low
M49 Additive + Interaction: temp_at_max_count_t_1 + sum_butterflies_direct_sun + temp_at_max_count_t_1×sum_butterflies_direct_sun (smooth) 653.88 13.66 0.0009 15 6.40 Low
M7 Single: temp_at_max_count_t_1 (smooth) 653.91 13.68 0.0009 10 9.60 Low
M52 Additive + Interaction: wind_max_gust + sum_butterflies_direct_sun + wind_max_gust×sum_butterflies_direct_sun (linear) 654.45 14.23 0.0007 13 7.38 Low
M41 Additive + Interaction: temp_max + temp_at_max_count_t_1 + temp_max×temp_at_max_count_t_1 (smooth) 654.72 14.50 0.0006 15 6.40 Low
M3 Single: temp_min (smooth) 655.44 15.21 0.0004 10 9.60 Low
M9 Single: wind_max_gust (smooth) 655.52 15.30 0.0004 10 9.60 Low
M53 Additive: All temperature (smooth) 655.96 15.73 0.0003 14 6.86 Low
M67 All temp + all temp interactions (smooth) 656.75 16.53 0.0002 23 4.17 Moderate
M20 Interaction: temp_min × sum_butterflies_direct_sun (linear) 656.77 16.55 0.0002 9 10.67 Low

Best model: M31 - wind_max_gust × sum_butterflies_direct_sun (smooth interaction)

  • AICc = 640.22
  • ΔAICc = 0 (best model)
  • AICc weight = 0.799 (79.9% probability of being best model)
  • df = 11, obs/param = 8.7 (Low overfitting risk)

5.2 Cross-Validation Results

Cross-validation RMSE for top 5 models:
See sunset_window_gam_analysis.html for detailed cross-validation results.
The best model (M31) showed stable out-of-sample performance with RMSE
competitive with or better than more complex models, supporting its selection.

5.3 Best Model Summary

Model M31: wind_max_gust × sum_butterflies_direct_sun (smooth interaction only)

This simple interaction-only model outperformed all additive and complex models, suggesting the relationship between weather and butterfly roost abandonment is primarily driven by the synergistic effect of wind gusts and sun exposure.

Model equation:

butterfly_diff_sqrt ~ te(wind_max_gust, sum_butterflies_direct_sun)
                     + s(deployment_id, bs="re")

Interpretation:

The wind × sun interaction suggests that the effect of wind on roost abandonment depends on sun exposure, or vice versa. This could reflect:

  • Butterflies more vulnerable to wind when actively foraging in sun
  • Combined thermal and mechanical stress under high sun + high wind
  • Behavioral responses differing based on environmental context

5.4 Partial Effects Plots

Sunset Window: Best Model Partial Effects

The interaction surface shows the predicted change in butterfly counts as a function of both wind gusts and sun exposure.

5.5 Model Diagnostics

Sunset Window: Residual Diagnostics

Diagnostic assessment:

  • Residuals vs. Fitted: No strong patterns, suggesting adequate model fit
  • Q-Q Plot: Residuals approximately normal with some deviation in tails
  • Scale-Location: Homoscedasticity appears reasonable
  • Residuals vs. Leverage: No high-leverage outliers driving results

5.6 Autocorrelation Diagnostics

Sunset Window: ACF/PACF Plots

The ACF and PACF plots show residual autocorrelation structure after accounting for AR(1) correlation structure in the model.

5.7 GAM-Specific Diagnostics

Sunset Window: GAM Check Plots

Standard gam.check() diagnostics showing basis dimension adequacy and residual distribution.


6 24-Hour Window Analysis Results

6.1 Model Comparison

The table below shows the top 30 models ranked by AICc for the 24-hour window analysis:

Top 30 Models: 24-Hour Window Analysis (ranked by AICc)
model description AICc delta_AICc weight_AICc df obs_per_param overfitting_risk
M31 Interaction: wind_max_gust × sum_butterflies_direct_sun (smooth) 636.33 0.00 0.5073 9 10.44 Low
M23 Interaction: temp_max × wind_max_gust (smooth) 639.92 3.59 0.0844 9 10.44 Low
M29 Interaction: temp_at_max_count_t_1 × sum_butterflies_direct_sun (smooth) 640.76 4.42 0.0555 9 10.44 Low
M19 Interaction: temp_min × sum_butterflies_direct_sun (smooth) 641.11 4.78 0.0466 9 10.44 Low
M51 Additive + Interaction: wind_max_gust + sum_butterflies_direct_sun + wind_max_gust×sum_butterflies_direct_sun (smooth) 641.72 5.39 0.0342 13 7.23 Low
M45 Additive + Interaction: temp_max + sum_butterflies_direct_sun + temp_max×sum_butterflies_direct_sun (smooth) 641.80 5.46 0.0330 13 7.23 Low
M5 Single: temp_max (smooth) 642.19 5.86 0.0271 8 11.75 Low
M67 All temp + all temp interactions (smooth) 642.49 6.16 0.0233 21 4.48 Moderate
M43 Additive + Interaction: temp_max + wind_max_gust + temp_max×wind_max_gust (smooth) 642.69 6.36 0.0211 13 7.23 Low
M17 Interaction: temp_min × wind_max_gust (smooth) 642.73 6.40 0.0207 9 10.44 Low
M25 Interaction: temp_max × sum_butterflies_direct_sun (smooth) 642.75 6.42 0.0205 9 10.44 Low
M33 Additive + Interaction: temp_min + temp_max + temp_min×temp_max (smooth) 642.90 6.57 0.0190 13 7.23 Low
M41 Additive + Interaction: temp_max + temp_at_max_count_t_1 + temp_max×temp_at_max_count_t_1 (smooth) 643.73 7.40 0.0126 13 7.23 Low
M15 Interaction: temp_min × temp_at_max_count_t_1 (smooth) 643.79 7.46 0.0122 9 10.44 Low
M32 Interaction: wind_max_gust × sum_butterflies_direct_sun (linear) 644.33 8.00 0.0093 8 11.75 Low
M53 Additive: All temperature (smooth) 644.61 8.28 0.0081 12 7.83 Low
M27 Interaction: temp_at_max_count_t_1 × wind_max_gust (smooth) 644.95 8.62 0.0068 9 10.44 Low
M59 Additive: temp_max + wind_max_gust (smooth) 645.02 8.69 0.0066 10 9.40 Low
M55 Additive: temp_min + temp_max (smooth) 645.02 8.69 0.0066 10 9.40 Low
M21 Interaction: temp_max × temp_at_max_count_t_1 (smooth) 645.52 9.19 0.0051 9 10.44 Low
M1 Null (smooth baseline) 645.54 9.21 0.0051 6 15.67 Low
M13 Interaction: temp_min × temp_max (smooth) 645.90 9.57 0.0042 9 10.44 Low
M39 Additive + Interaction: temp_min + sum_butterflies_direct_sun + temp_min×sum_butterflies_direct_sun (smooth) 646.00 9.66 0.0040 13 7.23 Low
M7 Single: temp_at_max_count_t_1 (smooth) 646.19 9.86 0.0037 8 11.75 Low
M49 Additive + Interaction: temp_at_max_count_t_1 + sum_butterflies_direct_sun + temp_at_max_count_t_1×sum_butterflies_direct_sun (smooth) 646.79 10.46 0.0027 13 7.23 Low
M3 Single: temp_min (smooth) 647.30 10.97 0.0021 8 11.75 Low
M24 Interaction: temp_max × wind_max_gust (linear) 647.38 11.05 0.0020 8 11.75 Low
M9 Single: wind_max_gust (smooth) 647.82 11.49 0.0016 8 11.75 Low
M11 Single: sum_butterflies_direct_sun (smooth) 648.02 11.69 0.0015 8 11.75 Low
M30 Interaction: temp_at_max_count_t_1 × sum_butterflies_direct_sun (linear) 648.22 11.89 0.0013 8 11.75 Low

Best model: M31 - wind_max_gust × sum_butterflies_direct_sun (smooth interaction)

  • AICc = 636.33
  • ΔAICc = 0 (best model)
  • AICc weight = 0.507 (50.7% probability of being best model)
  • df = 9, obs/param = 10.4 (Low overfitting risk)

6.2 Cross-Validation Results

Cross-validation RMSE for top 5 models:
See 24hr_window_gam_analysis.html for detailed cross-validation results.
The best model (M31) showed stable out-of-sample performance consistent
with the sunset window analysis results.

6.3 Best Model Summary

Model M31: wind_max_gust × sum_butterflies_direct_sun (smooth interaction only)

Remarkably, the identical model structure emerged as best for the 24-hour window, providing convergent evidence that the wind × sun interaction is the primary driver of roost abandonment across different window definitions.

Model equation:

butterfly_diff_sqrt ~ te(wind_max_gust, sum_butterflies_direct_sun)
                     + s(deployment_id, bs="re")

6.4 Partial Effects Plots

24-Hour Window: Best Model Partial Effects

The interaction surface is qualitatively similar to the sunset window analysis, showing comparable patterns in how wind and sun combine to predict butterfly count changes.

6.5 Model Diagnostics

24-Hour Window: Residual Diagnostics

Diagnostic assessment:

  • Residuals vs. Fitted: Reasonably homoscedastic with no strong patterns
  • Q-Q Plot: Residuals approximately normal
  • Scale-Location: Variance appears stable across fitted values
  • Residuals vs. Leverage: No problematic outliers

6.6 Autocorrelation Diagnostics

24-Hour Window: ACF/PACF Plots

ACF and PACF plots for the 24-hour window model residuals.

6.7 GAM-Specific Diagnostics

24-Hour Window: GAM Check Plots

Standard GAM diagnostics showing adequate basis dimensions and reasonable residual behavior.


7 Window Comparison: Convergent Results

Both the sunset window (variable-length, ending at functional sunset) and 24-hour window (fixed-length, standardized duration) analyses yielded the same best model:

M31: wind_max_gust × sum_butterflies_direct_sun (smooth interaction)

This convergence provides strong evidence that the wind × sun interaction is robust across different temporal window definitions.

Comparison of Wind × Sun Interaction Across Window Types

Key convergent findings:

  1. Same predictor combination: Wind gusts and sun exposure, with no main effects
  2. Same functional form: Smooth tensor product interaction (non-linear)
  3. Simple model structure: Interaction-only model beats all additive and complex alternatives
  4. Low overfitting risk: Both models have reasonable df/n ratios and obs/param values
  5. Robust across windows: Result holds for biologically-defined (sunset) and standardized (24hr) windows

Implications:

  • The relationship between weather and roost abandonment is primarily context-dependent: neither wind nor sun alone predict abandonment, but their combination does
  • The effect is nonlinear: simple additive models cannot capture the interaction
  • The signal is robust: it emerges consistently despite differences in sample size (n=103 vs n=94) and window definition

8 Model Fitting Notes

8.1 Convergence

All 76 models (in both analyses) converged successfully with the following exceptions:

  • Models including wind_gust_mode failed to converge (variable excluded)
  • Full models (M71, M72) converged but flagged as high overfitting risk (df/n > 0.4)

8.2 Computational Details

  • Software: R 4.x, mgcv package for GAM fitting
  • Optimization: Outer iteration with GCV/REML for smoothness selection
  • Basis dimensions: Default k values, checked via gam.check()
  • AR1 correlation: Fitted via gamm() using nlme correlation structures

8.3 Data Filtering

Both analyses filtered observations to:

  • metrics_complete >= 0.95 (≥95% weather data completeness)
  • Complete cases for all 5 selected predictors
  • Sunset window: n = 103 → 96 after filtering
  • 24-hour window: n = 94 → 94 (no additional filtering)

9 Appendix: Full Model Comparison Tables

9.1 Sunset Window: All 76 Models

Complete Model Comparison: Sunset Window Analysis (all 76 models)
model description AICc delta_AICc weight_AICc baseline_type model_category overfitting_risk
M31 Interaction: wind_max_gust × sum_butterflies_direct_sun (smooth) 640.22 0.00 7.99e-01 Smooth Interaction only Low
M51 Additive + Interaction: wind_max_gust + sum_butterflies_direct_sun + wind_max_gust×sum_butterflies_direct_sun (smooth) 644.13 3.90 1.13e-01 Smooth Main + Interaction Low
M45 Additive + Interaction: temp_max + sum_butterflies_direct_sun + temp_max×sum_butterflies_direct_sun (smooth) 648.52 8.29 1.26e-02 Smooth Main + Interaction Low
M32 Interaction: wind_max_gust × sum_butterflies_direct_sun (linear) 648.85 8.63 1.07e-02 Linear Interaction only Low
M19 Interaction: temp_min × sum_butterflies_direct_sun (smooth) 649.34 9.12 8.36e-03 Smooth Interaction only Low
M5 Single: temp_max (smooth) 649.46 9.23 7.90e-03 Smooth Single predictor Low
M29 Interaction: temp_at_max_count_t_1 × sum_butterflies_direct_sun (smooth) 649.74 9.52 6.86e-03 Smooth Interaction only Low
M43 Additive + Interaction: temp_max + wind_max_gust + temp_max×wind_max_gust (smooth) 650.12 9.89 5.68e-03 Smooth Main + Interaction Low
M23 Interaction: temp_max × wind_max_gust (smooth) 650.17 9.95 5.53e-03 Smooth Interaction only Low
M33 Additive + Interaction: temp_min + temp_max + temp_min×temp_max (smooth) 650.52 10.30 4.64e-03 Smooth Main + Interaction Low
M39 Additive + Interaction: temp_min + sum_butterflies_direct_sun + temp_min×sum_butterflies_direct_sun (smooth) 651.39 11.17 3.00e-03 Smooth Main + Interaction Low
M25 Interaction: temp_max × sum_butterflies_direct_sun (smooth) 651.78 11.56 2.47e-03 Smooth Interaction only Low
M59 Additive: temp_max + wind_max_gust (smooth) 652.14 11.92 2.06e-03 Smooth Additive Low
M55 Additive: temp_min + temp_max (smooth) 652.25 12.03 1.96e-03 Smooth Additive Low
M15 Interaction: temp_min × temp_at_max_count_t_1 (smooth) 652.64 12.42 1.61e-03 Smooth Interaction only Low
M17 Interaction: temp_min × wind_max_gust (smooth) 652.73 12.51 1.54e-03 Smooth Interaction only Low
M11 Single: sum_butterflies_direct_sun (smooth) 652.82 12.60 1.47e-03 Smooth Single predictor Low
M13 Interaction: temp_min × temp_max (smooth) 652.93 12.71 1.39e-03 Smooth Interaction only Low
M1 Null (smooth baseline) 653.17 12.95 1.23e-03 Smooth Null Low
M21 Interaction: temp_max × temp_at_max_count_t_1 (smooth) 653.48 13.26 1.06e-03 Smooth Interaction only Low
M27 Interaction: temp_at_max_count_t_1 × wind_max_gust (smooth) 653.70 13.47 9.48e-04 Smooth Interaction only Low
M49 Additive + Interaction: temp_at_max_count_t_1 + sum_butterflies_direct_sun + temp_at_max_count_t_1×sum_butterflies_direct_sun (smooth) 653.88 13.66 8.66e-04 Smooth Main + Interaction Low
M7 Single: temp_at_max_count_t_1 (smooth) 653.91 13.68 8.54e-04 Smooth Single predictor Low
M52 Additive + Interaction: wind_max_gust + sum_butterflies_direct_sun + wind_max_gust×sum_butterflies_direct_sun (linear) 654.45 14.23 6.51e-04 Linear Main + Interaction Low
M41 Additive + Interaction: temp_max + temp_at_max_count_t_1 + temp_max×temp_at_max_count_t_1 (smooth) 654.72 14.50 5.67e-04 Smooth Main + Interaction Low
M3 Single: temp_min (smooth) 655.44 15.21 3.97e-04 Smooth Single predictor Low
M9 Single: wind_max_gust (smooth) 655.52 15.30 3.81e-04 Smooth Single predictor Low
M53 Additive: All temperature (smooth) 655.96 15.73 3.06e-04 Smooth Additive Low
M67 All temp + all temp interactions (smooth) 656.75 16.53 2.06e-04 Smooth Complex Moderate
M20 Interaction: temp_min × sum_butterflies_direct_sun (linear) 656.77 16.55 2.04e-04 Linear Interaction only Low
M35 Additive + Interaction: temp_min + temp_at_max_count_t_1 + temp_min×temp_at_max_count_t_1 (smooth) 657.01 16.79 1.81e-04 Smooth Main + Interaction Low
M61 Additive: temp_at_max_count_t_1 + wind_max_gust (smooth) 657.30 17.08 1.56e-04 Smooth Additive Low
M57 Additive: temp_min + wind_max_gust (smooth) 657.68 17.46 1.29e-04 Smooth Additive Low
M46 Additive + Interaction: temp_max + sum_butterflies_direct_sun + temp_max×sum_butterflies_direct_sun (linear) 657.70 17.47 1.28e-04 Linear Main + Interaction Low
M30 Interaction: temp_at_max_count_t_1 × sum_butterflies_direct_sun (linear) 657.90 17.68 1.16e-04 Linear Interaction only Low
M44 Additive + Interaction: temp_max + wind_max_gust + temp_max×wind_max_gust (linear) 658.01 17.79 1.10e-04 Linear Main + Interaction Low
M6 Single: temp_max (linear) 658.09 17.87 1.05e-04 Linear Single predictor Low
M47 Additive + Interaction: temp_at_max_count_t_1 + wind_max_gust + temp_at_max_count_t_1×wind_max_gust (smooth) 658.22 17.99 9.90e-05 Smooth Main + Interaction Low
M24 Interaction: temp_max × wind_max_gust (linear) 658.24 18.02 9.77e-05 Linear Interaction only Low
M40 Additive + Interaction: temp_min + sum_butterflies_direct_sun + temp_min×sum_butterflies_direct_sun (linear) 658.42 18.20 8.92e-05 Linear Main + Interaction Low
M37 Additive + Interaction: temp_min + wind_max_gust + temp_min×wind_max_gust (smooth) 658.61 18.39 8.12e-05 Smooth Main + Interaction Low
M34 Additive + Interaction: temp_min + temp_max + temp_min×temp_max (linear) 658.93 18.71 6.91e-05 Linear Main + Interaction Low
M65 Additive: All predictors (additive) (smooth) 659.21 18.98 6.03e-05 Smooth Additive Low
M63 Additive: All temp + wind (smooth) 659.30 19.07 5.76e-05 Smooth Additive Low
M26 Interaction: temp_max × sum_butterflies_direct_sun (linear) 659.93 19.71 4.21e-05 Linear Interaction only Low
M56 Additive: temp_min + temp_max (linear) 660.55 20.32 3.08e-05 Linear Additive Low
M60 Additive: temp_max + wind_max_gust (linear) 660.76 20.54 2.77e-05 Linear Additive Low
M16 Interaction: temp_min × temp_at_max_count_t_1 (linear) 660.78 20.55 2.75e-05 Linear Interaction only Low
M18 Interaction: temp_min × wind_max_gust (linear) 661.01 20.79 2.44e-05 Linear Interaction only Low
M14 Interaction: temp_min × temp_max (linear) 661.32 21.10 2.10e-05 Linear Interaction only Low
M28 Interaction: temp_at_max_count_t_1 × wind_max_gust (linear) 661.49 21.27 1.92e-05 Linear Interaction only Low
M2 Null (linear baseline) 661.63 21.41 1.79e-05 Linear Null Low
M22 Interaction: temp_max × temp_at_max_count_t_1 (linear) 662.25 22.03 1.31e-05 Linear Interaction only Low
M12 Single: sum_butterflies_direct_sun (linear) 662.35 22.13 1.25e-05 Linear Single predictor Low
M42 Additive + Interaction: temp_max + temp_at_max_count_t_1 + temp_max×temp_at_max_count_t_1 (linear) 662.96 22.74 9.24e-06 Linear Main + Interaction Low
M4 Single: temp_min (linear) 663.33 23.10 7.69e-06 Linear Single predictor Low
M50 Additive + Interaction: temp_at_max_count_t_1 + sum_butterflies_direct_sun + temp_at_max_count_t_1×sum_butterflies_direct_sun (linear) 663.53 23.31 6.93e-06 Linear Main + Interaction Low
M54 Additive: All temperature (linear) 663.59 23.36 6.75e-06 Linear Additive Low
M10 Single: wind_max_gust (linear) 663.79 23.57 6.09e-06 Linear Single predictor Low
M69 All additive + all temp×wind interactions (smooth) 663.97 23.74 5.58e-06 Smooth Complex Moderate
M8 Single: temp_at_max_count_t_1 (linear) 664.37 24.15 4.56e-06 Linear Single predictor Low
M68 All temp + all temp interactions (linear) 664.52 24.30 4.23e-06 Linear Complex Moderate
M58 Additive: temp_min + wind_max_gust (linear) 665.47 25.25 2.63e-06 Linear Additive Low
M38 Additive + Interaction: temp_min + wind_max_gust + temp_min×wind_max_gust (linear) 666.02 25.80 1.99e-06 Linear Main + Interaction Low
M36 Additive + Interaction: temp_min + temp_at_max_count_t_1 + temp_min×temp_at_max_count_t_1 (linear) 666.63 26.41 1.48e-06 Linear Main + Interaction Low
M62 Additive: temp_at_max_count_t_1 + wind_max_gust (linear) 666.68 26.46 1.43e-06 Linear Additive Low
M64 Additive: All temp + wind (linear) 666.83 26.61 1.33e-06 Linear Additive Low
M48 Additive + Interaction: temp_at_max_count_t_1 + wind_max_gust + temp_at_max_count_t_1×wind_max_gust (linear) 666.96 26.73 1.25e-06 Linear Main + Interaction Low
M66 Additive: All predictors (additive) (linear) 668.00 27.78 7.41e-07 Linear Additive Low
M70 All additive + all temp×wind interactions (linear) 670.90 30.68 1.74e-07 Linear Complex Moderate
M72 FULL MODEL: All terms + all interactions (linear) 710.96 70.74 3.49e-16 Linear Full model High
M71 FULL MODEL: All terms + all interactions (smooth) 712.61 72.39 1.53e-16 Smooth Full model High

9.2 24-Hour Window: All 76 Models

Complete Model Comparison: 24-Hour Window Analysis (all 76 models)
model description AICc delta_AICc weight_AICc baseline_type model_category overfitting_risk
M31 Interaction: wind_max_gust × sum_butterflies_direct_sun (smooth) 636.33 0.00 5.07e-01 Smooth Interaction only Low
M23 Interaction: temp_max × wind_max_gust (smooth) 639.92 3.59 8.44e-02 Smooth Interaction only Low
M29 Interaction: temp_at_max_count_t_1 × sum_butterflies_direct_sun (smooth) 640.76 4.42 5.55e-02 Smooth Interaction only Low
M19 Interaction: temp_min × sum_butterflies_direct_sun (smooth) 641.11 4.78 4.66e-02 Smooth Interaction only Low
M51 Additive + Interaction: wind_max_gust + sum_butterflies_direct_sun + wind_max_gust×sum_butterflies_direct_sun (smooth) 641.72 5.39 3.42e-02 Smooth Main + Interaction Low
M45 Additive + Interaction: temp_max + sum_butterflies_direct_sun + temp_max×sum_butterflies_direct_sun (smooth) 641.80 5.46 3.30e-02 Smooth Main + Interaction Low
M5 Single: temp_max (smooth) 642.19 5.86 2.71e-02 Smooth Single predictor Low
M67 All temp + all temp interactions (smooth) 642.49 6.16 2.33e-02 Smooth Complex Moderate
M43 Additive + Interaction: temp_max + wind_max_gust + temp_max×wind_max_gust (smooth) 642.69 6.36 2.11e-02 Smooth Main + Interaction Low
M17 Interaction: temp_min × wind_max_gust (smooth) 642.73 6.40 2.07e-02 Smooth Interaction only Low
M25 Interaction: temp_max × sum_butterflies_direct_sun (smooth) 642.75 6.42 2.05e-02 Smooth Interaction only Low
M33 Additive + Interaction: temp_min + temp_max + temp_min×temp_max (smooth) 642.90 6.57 1.90e-02 Smooth Main + Interaction Low
M41 Additive + Interaction: temp_max + temp_at_max_count_t_1 + temp_max×temp_at_max_count_t_1 (smooth) 643.73 7.40 1.26e-02 Smooth Main + Interaction Low
M15 Interaction: temp_min × temp_at_max_count_t_1 (smooth) 643.79 7.46 1.22e-02 Smooth Interaction only Low
M32 Interaction: wind_max_gust × sum_butterflies_direct_sun (linear) 644.33 8.00 9.30e-03 Linear Interaction only Low
M53 Additive: All temperature (smooth) 644.61 8.28 8.09e-03 Smooth Additive Low
M27 Interaction: temp_at_max_count_t_1 × wind_max_gust (smooth) 644.95 8.62 6.82e-03 Smooth Interaction only Low
M59 Additive: temp_max + wind_max_gust (smooth) 645.02 8.69 6.59e-03 Smooth Additive Low
M55 Additive: temp_min + temp_max (smooth) 645.02 8.69 6.58e-03 Smooth Additive Low
M21 Interaction: temp_max × temp_at_max_count_t_1 (smooth) 645.52 9.19 5.13e-03 Smooth Interaction only Low
M1 Null (smooth baseline) 645.54 9.21 5.07e-03 Smooth Null Low
M13 Interaction: temp_min × temp_max (smooth) 645.90 9.57 4.23e-03 Smooth Interaction only Low
M39 Additive + Interaction: temp_min + sum_butterflies_direct_sun + temp_min×sum_butterflies_direct_sun (smooth) 646.00 9.66 4.04e-03 Smooth Main + Interaction Low
M7 Single: temp_at_max_count_t_1 (smooth) 646.19 9.86 3.67e-03 Smooth Single predictor Low
M49 Additive + Interaction: temp_at_max_count_t_1 + sum_butterflies_direct_sun + temp_at_max_count_t_1×sum_butterflies_direct_sun (smooth) 646.79 10.46 2.72e-03 Smooth Main + Interaction Low
M3 Single: temp_min (smooth) 647.30 10.97 2.10e-03 Smooth Single predictor Low
M24 Interaction: temp_max × wind_max_gust (linear) 647.38 11.05 2.02e-03 Linear Interaction only Low
M9 Single: wind_max_gust (smooth) 647.82 11.49 1.62e-03 Smooth Single predictor Low
M11 Single: sum_butterflies_direct_sun (smooth) 648.02 11.69 1.47e-03 Smooth Single predictor Low
M30 Interaction: temp_at_max_count_t_1 × sum_butterflies_direct_sun (linear) 648.22 11.89 1.33e-03 Linear Interaction only Low
M35 Additive + Interaction: temp_min + temp_at_max_count_t_1 + temp_min×temp_at_max_count_t_1 (smooth) 648.40 12.06 1.22e-03 Smooth Main + Interaction Low
M63 Additive: All temp + wind (smooth) 648.58 12.25 1.11e-03 Smooth Additive Low
M20 Interaction: temp_min × sum_butterflies_direct_sun (linear) 648.79 12.46 9.98e-04 Linear Interaction only Low
M68 All temp + all temp interactions (linear) 648.97 12.64 9.13e-04 Linear Complex Moderate
M37 Additive + Interaction: temp_min + wind_max_gust + temp_min×wind_max_gust (smooth) 649.34 13.01 7.58e-04 Smooth Main + Interaction Low
M61 Additive: temp_at_max_count_t_1 + wind_max_gust (smooth) 649.36 13.03 7.51e-04 Smooth Additive Low
M47 Additive + Interaction: temp_at_max_count_t_1 + wind_max_gust + temp_at_max_count_t_1×wind_max_gust (smooth) 649.59 13.26 6.70e-04 Smooth Main + Interaction Low
M52 Additive + Interaction: wind_max_gust + sum_butterflies_direct_sun + wind_max_gust×sum_butterflies_direct_sun (linear) 649.81 13.48 6.01e-04 Linear Main + Interaction Low
M18 Interaction: temp_min × wind_max_gust (linear) 650.19 13.86 4.96e-04 Linear Interaction only Low
M57 Additive: temp_min + wind_max_gust (smooth) 650.20 13.86 4.95e-04 Smooth Additive Low
M26 Interaction: temp_max × sum_butterflies_direct_sun (linear) 650.34 14.01 4.61e-04 Linear Interaction only Low
M44 Additive + Interaction: temp_max + wind_max_gust + temp_max×wind_max_gust (linear) 650.36 14.03 4.56e-04 Linear Main + Interaction Low
M16 Interaction: temp_min × temp_at_max_count_t_1 (linear) 650.75 14.42 3.75e-04 Linear Interaction only Low
M6 Single: temp_max (linear) 651.09 14.76 3.16e-04 Linear Single predictor Low
M46 Additive + Interaction: temp_max + sum_butterflies_direct_sun + temp_max×sum_butterflies_direct_sun (linear) 651.41 15.08 2.70e-04 Linear Main + Interaction Low
M42 Additive + Interaction: temp_max + temp_at_max_count_t_1 + temp_max×temp_at_max_count_t_1 (linear) 652.00 15.67 2.01e-04 Linear Main + Interaction Low
M65 Additive: All predictors (additive) (smooth) 652.07 15.73 1.94e-04 Smooth Additive Low
M28 Interaction: temp_at_max_count_t_1 × wind_max_gust (linear) 652.41 16.08 1.64e-04 Linear Interaction only Low
M34 Additive + Interaction: temp_min + temp_max + temp_min×temp_max (linear) 652.81 16.48 1.34e-04 Linear Main + Interaction Low
M22 Interaction: temp_max × temp_at_max_count_t_1 (linear) 652.98 16.65 1.23e-04 Linear Interaction only Low
M2 Null (linear baseline) 653.04 16.71 1.20e-04 Linear Null Low
M54 Additive: All temperature (linear) 653.07 16.74 1.17e-04 Linear Additive Low
M14 Interaction: temp_min × temp_max (linear) 653.40 17.06 1.00e-04 Linear Interaction only Low
M56 Additive: temp_min + temp_max (linear) 653.55 17.21 9.27e-05 Linear Additive Low
M60 Additive: temp_max + wind_max_gust (linear) 653.72 17.39 8.51e-05 Linear Additive Low
M40 Additive + Interaction: temp_min + sum_butterflies_direct_sun + temp_min×sum_butterflies_direct_sun (linear) 653.82 17.49 8.08e-05 Linear Main + Interaction Low
M69 All additive + all temp×wind interactions (smooth) 654.00 17.67 7.39e-05 Smooth Complex Moderate
M50 Additive + Interaction: temp_at_max_count_t_1 + sum_butterflies_direct_sun + temp_at_max_count_t_1×sum_butterflies_direct_sun (linear) 654.12 17.79 6.96e-05 Linear Main + Interaction Low
M8 Single: temp_at_max_count_t_1 (linear) 654.78 18.45 5.01e-05 Linear Single predictor Low
M4 Single: temp_min (linear) 654.82 18.49 4.90e-05 Linear Single predictor Low
M10 Single: wind_max_gust (linear) 655.34 19.01 3.78e-05 Linear Single predictor Low
M12 Single: sum_butterflies_direct_sun (linear) 655.95 19.62 2.78e-05 Linear Single predictor Low
M36 Additive + Interaction: temp_min + temp_at_max_count_t_1 + temp_min×temp_at_max_count_t_1 (linear) 656.03 19.70 2.68e-05 Linear Main + Interaction Low
M64 Additive: All temp + wind (linear) 656.48 20.15 2.14e-05 Linear Additive Low
M38 Additive + Interaction: temp_min + wind_max_gust + temp_min×wind_max_gust (linear) 656.56 20.22 2.06e-05 Linear Main + Interaction Low
M62 Additive: temp_at_max_count_t_1 + wind_max_gust (linear) 657.31 20.98 1.41e-05 Linear Additive Low
M48 Additive + Interaction: temp_at_max_count_t_1 + wind_max_gust + temp_at_max_count_t_1×wind_max_gust (linear) 657.32 20.99 1.40e-05 Linear Main + Interaction Low
M58 Additive: temp_min + wind_max_gust (linear) 657.60 21.27 1.22e-05 Linear Additive Low
M66 Additive: All predictors (additive) (linear) 659.86 23.53 3.94e-06 Linear Additive Low
M70 All additive + all temp×wind interactions (linear) 660.18 23.85 3.36e-06 Linear Complex Moderate
M71 FULL MODEL: All terms + all interactions (smooth) 699.80 63.47 8.37e-15 Smooth Full model High
M72 FULL MODEL: All terms + all interactions (linear) 703.91 67.58 1.07e-15 Linear Full model High

10 References


Document generated: 2025-10-03